package com.xes.online.service;

import com.xes.online.resource.TalSink;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Service;

/**
 * @program: scs-demo
 * @description:
 * @author: pkn
 * @create: 2020-06-28 16:19
 */
@Service
@EnableBinding(TalSink.class)
public class TalReceiveService {

    @StreamListener("input1")
    public void receiveInput1(Object reciverdMsg) {
        System.out.println("this is input1");
        System.out.println("Recived Msg: " + reciverdMsg);
    }

    @StreamListener("input2")
    public void receiveInput2(String reciverdMsg) {
        System.out.println("Recived Msg: " + reciverdMsg);
    }


}
